~ chicken-core (chicken-5) /manual/Module (chicken time)
Trap1[[tags: manual]]2[[toc:]]34== Module (chicken time)56This module provides a few basic procedures for measuring time.7For representation and manipulation of calendar time, see8[[Module (chicken time posix)]].910=== Retrieving timestamp information1112==== cpu-time1314<procedure>(cpu-time)</procedure>1516Returns the used CPU time of the current process in milliseconds as17two values: the time spent in user code, and the time spent in system18code. On platforms where user and system time can not be differentiated,19system time is always 0.202122==== current-process-milliseconds2324<procedure>(current-process-milliseconds)</procedure>2526Returns the number of milliseconds since process startup.272829==== current-seconds3031<procedure>(current-seconds)</procedure>3233Returns the number of seconds since midnight, Jan. 1, 1970.343536=== Benchmarking macros3738==== time3940<macro>(time EXP1 ...)</macro>4142Performs a major garbage collection, evaluates {{EXP1 ...}} and prints43elapsed CPU time and some values about GC use, like time spent in44major GCs, number of minor and major GCs. The output is sent to the45port that is the current value of {{(current-error-port)}}. Nested46invocations of this form will give incorrect results for all output47but the innermost.484950---51Previous: [[Module (chicken tcp)]]5253Next: [[Module (chicken time posix)]]